package com.lagou.niancheng.core.transaction;

import com.lagou.niancheng.core.config.Configuration;


/**
 * com.lagou.niancheng.core.transaction.DefaultTransactionManagerFactory
 *
 * @author 大犬
 * @date 2020/3/27
 */
public class DefaultTransactionManagerFactory implements TransactionManagerFactory {

    @Override
    public TransactionManager createTransactionManager(Configuration configuration) {
        return new DefaultTransactionManager(configuration.getDataSource(), configuration.getAutoCommit());
    }
}
